export function getErrorCodeMsg(code: number, description?: string) {
	var str = '' //提示信息
	switch (code) {
		case 10001:
			str = '请求参数错误'
			break
		case 10002:
			str = '请求参数错误，x+width不能大于原图宽带，y+height不能大于原图高度'
			break
		case 10003:
			str = '图片参数错误，请重新上传图片!'
			break
		case 10004:
			str = '文件大小受限'
			break
		case 10005:
			str = '文件类型受限'
			break
		case 10007:
			str = '上传过程发生错误'
			break
		case 10008:
			str = '图片处理发生错误'
			break
		case 10009:
			str = '图片传输KDFS异常'
			break
		case 10010:
			str = 'KDFS头像资源不存在'
			break
		case 10011:
			str = 'KDFS资源不存在'
			break
		case 10303:
			str = '用户已加入该分组，不能增加'
			break
		case 10315:
			str = '不能操作分组'
			break
		case 10501:
			str = '图像长、宽不能为空'
			break
		case 10502:
			str = '图像长、宽必须保持一致'
			break
		case 20002:
			str = '用户域不存在'
			break
		case 20004:
			str = '邮箱已被使用'
			break
		case 20006:
			str = '账号不存在'
			break
		case 20007:
			str = '原密码输入错误'
			break
		case 20008:
			str = '用户名或密码错误'
			break
		case 20010:
			str = '没有操作权限'
			break
		case 20011:
			str = '登录设备错误'
			break
		case 20016:
			str = '网络连接失败，请稍候重试！'
			break
		case 20019:
			str = '此姓名已被使用'
			break
		case 20020:
			str = '号码已被绑定'
			break
		case 20021:
			str = '禁止修改姓名'
			break
		case 20039:
			str = '用户域不在服务域下'
			break
		case 20040:
			str = '号码已被启用'
			break
		case 20049:
			str = '机房信息不存在'
			break
		case 20050:
			str = '部门不存在'
			break
		case 20078:
			str = 'License不存在'
			break
		case 20141:
			str = '号码的长度必须为13位'
			break
		case 20142:
			str = '号码范围已超出号码的长度'
			break
		case 20151:
			str = '用户域未配置软终端授权数'
			break
		case 20169:
			str = '获取用户域信息失败'
			break
		case 20183:
			str = 'E164号码不能为空'
			break
		case 20195:
			str = '添加了重复的IP通讯录地址'
			break
		case 20196:
			str = '账号不能是纯数字'
			break
		case 20197:
			str = '用户所属服务域不存在'
			break
		case 20198:
			str = '用户所属服务域未启用'
			break
		case 20199:
			str = '用户所属用户域不存在'
			break
		case 20201:
			str = '不能删除默认服务域管理员'
			break
		case 20202:
			str = '不能删除默认用户域管理员'
			break
		case 20205:
			str = '添加的通讯录ip不能为空'
			break
		case 20211:
			str = '修改设备的ip地址不能为空'
			break
		case 20213:
			str = 'ip地址不存在'
			break
		case 20222:
			str = '不能移除E164账号'
			break
		case 20223:
			str = '不能移除未停用账号'
			break
		case 20227:
			str = '该账号已被其他管理员删除，请刷新组织架构列表重新编辑该账号'
			break
		case 20228:
			str = '不能启用默认服务域管理员'
			break
		case 20229:
			str = '不能启用默认用户域管理员'
			break
		case 20230:
			str = '不能停用默认服务域管理员'
			break
		case 20231:
			str = '不能停用默认用户域管理员'
			break
		case 20235:
			str = '不能操作默认分组'
			break
		case 20236:
			str = '账号停用失败'
			break
		case 20238:
			str = '层级分组层级不能超过16级'
			break
		case 20239:
			str = '指定用户没有查到对于用户域'
			break
		case 20240:
			str = 'E164号错误'
			break
		case 20243:
			str = '默认用户域管理员不能设置为来宾用户'
			break
		case 20244:
			str = '不能删除默认管理员'
			break
		case 20246:
			str = '必须保留一位审批员'
			break
		case 20251:
			str = '添加了重复的IP通讯录名称'
			break
		case 20256:
			str = 'IP通讯录名称或地址超过127字节'
			break
		case 20257:
			str = 'IP通讯录名称或地址超过64个字符'
			break
		case 20258:
			str = 'IP通讯录地址格式不正确'
			break
		case 20266:
			str = '账号已被使用'
			break
		case 20267:
			str = '手机号已被使用'
			break
		case 20270:
			str = '服务域不存在'
			break
		case 20273:
			str = '姓名已被使用'
			break
		case 20359:
			str = '设备限制信息moid不能为空'
			break
		case 20360:
			str = '设备限制信息不存在'
			break
		case 20904:
			str = '该机房下没有license授权'
			break
		case 20930:
			str = '终端信息获取失败'
			break
		case 20941:
			str = '用户域已配置权限的账号数量超出了当前设定值，请先关闭部分账号的会议调度授权'
			break
		case 20942:
			str = '用户域没有配置会议调度授权数'
			break
		case 20944:
			str = '不能创建终端号段999999，请选择其余号段'
			break
		case 21007:
			str = '同步自ldap的用户无法修改密码、手机、邮箱等个人信息'
			break
		case 21008:
			str = '姓名不可为空'
			break
		case 22000:
			str = 'md5匹配，无需重新加载图片'
			break
		case 22001:
			str = '产品配置 信息不存在'
			break
		case 50000:
			str = '成功（amcapi）'
			break
		case 52000:
			str = '非空错误（amcapi）'
			break
		case 52001:
			str = '业务异常（amcapi）'
			break
		case 52002:
			str = '系统异常（amcapi）'
			break
		case 52003:
			str = '系统错误（amcapi）'
			break
		case 52004:
			str = '申请信息校验异常（amcapi）'
			break
		case 52005:
			str = '记录信息不存在（amcapi）'
			break
		case 52006:
			str = '用户名或密码不能为空（amcapi）'
			break
		case 52007:
			str = '密码错误（amcapi）'
			break
		case 52008:
			str = '用户名不存在（amcapi）'
			break
		case 52009:
			str = 'API版本信息缺失（amcapi）'
			break
		case 52010:
			str = 'API级别信息缺失（amcapi）'
			break
		case 52011:
			str = 'E164终端号码不能为空（amcapi）'
			break
		case 99991:
			str = 'service基础服务通讯异常！'
			break
		case 99992:
			str = '本次提交的申请与审批中的数据存在冲突！'
			break
		case 99993:
			str = '审批请求提交成功'
			break
		case 99994:
			str = '审批请求提交失败'
			break
		case 99995:
			str = '请求资源不存在'
			break
		case 99996:
			str = '系统正在处理业务，请稍候操作'
			break
		case 99997:
			str = 'SMS服务出错'
			break
		case 99998:
			str = 'XMPP服务出错'
			break
		case 99999:
			str = '系统处理出错'
			break
		case 100001:
			str = '用户名不正确'
			break
		case 100002:
			str = '密码不正确'
			break
		case 100003:
			str = '账号被锁定错误'
			break
		case 100004:
			str = '首次登录'
			break
		case 100005:
			str = '密码过期'
			break
		case 100006:
			str = '密码强度不足'
			break
		case 100007:
			str = '密码输入次数已达上限，账号被锁定'
			break
		case 100010:
			str = 'token 值已经登出'
			break
		case 100011:
			str = 'token 验证错误'
			break
		case 100012:
			str = 'token已被踢出'
			break
		case 100020:
			str = 'NonceExpiredException'
			break
		case 100021:
			str = '无该会议机房业务应用权限'
			break
		case 110000:
			str = '账号不能为7/11/13位纯数字'
			break
		case 110001:
			str = '不能添加用户到来宾用户组'
			break
		case 110002:
			str = '不能添加用户到号码组'
			break
		case 110003:
			str = '不能添加用户到未分组'
			break
		case 110004:
			str = '来宾用户不能添加到指定分组'
			break
		case 110005:
			str = '请在直属分组进行移除操作'
			break
		case 110006:
			str = '用户域下没有对应的部门分组'
			break
		case 110007:
			str = '最多只能添加1000个通讯录'
			break
		case 110008:
			str = '已经加入到通讯录'
			break
		case 110009:
			str = '没有足够的e164进行分配'
			break
		case 110010:
			str = '所选的账号不属于同一用户域'
			break
		case 110011:
			str = '导入的文件格式不正确'
			break
		case 110012:
			str = '文件上传失败'
			break
		case 110013:
			str = '号码已存在！'
			break
		case 110014:
			str = '账号只能为13位、sn序列号只能为10或者16位字母和数字'
			break
		case 110015:
			str = '密码已使用'
			break
		case 110016:
			str = '密码重置链接超时'
			break
		case 110017:
			str = '不能删除超级管理员'
			break
		case 110018:
			str = '号码组用户不能移除'
			break
		case 110100:
			str = '匿名账号获取失败'
			break
		case 110101:
			str = '匿名账号保活失败'
			break
		case 110200:
			str = '安全规则不存在'
			break
		case 110400:
			str = '超过软件终端可入网数'
			break
		case 110401:
			str = '可分配的授权数为空'
			break
		case 110402:
			str = '可分配的软件授权数不足'
			break
		case 110403:
			str = '可分配的接入端口授权数不足'
			break
		case 110404:
			str = '可分配的H264媒体端口授权数不足'
			break
		case 110405:
			str = '可分配的H265媒体端口授权数不足'
			break
		case 110406:
			str = '可分配的会议调度授权数不足'
			break
		case 110407:
			str = '总的浮动授权为空'
			break
		case 110408:
			str = '导入授权失败'
			break
		case 110600:
			str = '号段不存在'
			break
		case 110601:
			str = '邮件发送失败'
			break
		case 110602:
			str = '邮件模板加载失败'
			break
		case 110603:
			str = '邮件发送过于频繁'
			break
		case 112001:
			str = '父部门信息不存在'
			break
		case 112002:
			str = '部门信息不存在'
			break
		case 112003:
			str = '部门名称重复'
			break
		case 112004:
			str = '不能上移该分组'
			break
		case 112005:
			str = '不能下移该分组'
			break
		case 112006:
			str = '节点下已经存在同名分组，不能移动分组'
			break
		case 112007:
			str = '同步的分组不可操作'
			break
		case 113001:
			str = '超管必须是默认管理员'
			break
		case 120000:
			str = '服务域不存在'
			break
		case 120001:
			str = '机房不存在'
			break
		case 122002:
			str = '机房类型错误'
			break
		case 123000:
			str = '用户域不存在'
			break
		case 123001:
			str = '用户域名称重复'
			break
		case 123002:
			str = '匿名用户域不存在'
			break
		case 123003:
			str = '匿名用户域重复'
			break
		case 123004:
			str = '用户域存在未停用号码'
			break
		case 123005:
			str = '用户域存在未停用账号'
			break
		case 123006:
			str = '用户域存在未停用下级用户域'
			break
		case 123007:
			str = '接入端口授权数超出授权限制'
			break
		case 123008:
			str = 'H264端口授权数超出授权限制'
			break
		case 123009:
			str = 'H265媒体端口授权数超出授权限制'
			break
		case 123010:
			str = 'vcs授权数校验超出授权限制'
			break
		case 123011:
			str = '用户域权限不相同'
			break
		case 123012:
			str = '默认用户域不可删除'
			break
		case 123013:
			str = '请在同一用户域下批量创建账号'
			break
		case 124000:
			str = '集团不存在'
			break
		case 124001:
			str = '集团名称重复'
			break
		case 124002:
			str = '集团群组官方方已存在'
			break
		case 124003:
			str = '上级用户域错误'
			break
		case 124004:
			str = '用户域层级过深'
			break
		case 125000:
			str = '公共群组不存在'
			break
		case 125001:
			str = '公共群组分组名称重复'
			break
		case 125002:
			str = '公共群组分组层级宽度错误'
			break
		case 125003:
			str = '公共群组分组层级深度错误'
			break
		case 125004:
			str = '该群组根节点不可添加人员'
			break
		case 125005:
			str = '该群组根节点不可上移'
			break
		case 125006:
			str = '该群组根节点不可下移'
			break
		case 125007:
			str = '默认公共群组根节点不可操作'
			break
		case 125008:
			str = '该公共群组节点不可移动'
			break
		case 125009:
			str = '节点下已经存在同名分组，不能移动分组'
			break
		case 126000:
			str = 'ldap信息不存在'
			break
		case 126001:
			str = '解析证书有效时间错误'
			break
		case 126002:
			str = 'ldap用户信息同步失败'
			break
		case 126003:
			str = 'ldap服务器连接异常'
			break
		case 126004:
			str = '用户未开启ldpa'
			break
		case 126005:
			str = '用户域未开启ldap'
			break
		case 126006:
			str = '用户域不存在ldap服务器信息'
			break
		case 126007:
			str = '当前用户域正在同步'
			break
		case 126008:
			str = 'ldap全局唯一标记不可为空'
			break
		case 126009:
			str = 'ldap部门信息同步失败'
			break
		case 126010:
			str = 'ssl证书解析错误'
			break
		case 126011:
			str = '唯一标记获取失败'
			break
		case 126012:
			str = '服务器连接异常'
			break
		case 126013:
			str = '会议信息不存在'
			break
		case 127000:
			str = '产品配置信息不存在'
			break
		case 127001:
			str = '系统配置信息不存在'
			break
		case 127002:
			str = '信息窗信息不存在'
			break
		case 127003:
			str = '信息窗信息zip打包失败'
			break
		case 127004:
			str = '中已有发布的信息窗，请先撤回或删除之后再重新发布新的信息窗'
			break
		case 127005:
			str = '信息窗存储状态错误（存储空间不足）'
			break
		case 128001:
			str = '不能批量绑定不同机房的设备'
			break
		case 128002:
			str = '绑定的设备和用户域不在同一机房下'
			break
		case 129000:
			str = '设备不存在'
			break
		case 129001:
			str = '注册码错误'
			break
		case 129002:
			str = '公钥错误'
			break
		case 129003:
			str = '终端没有分配号码'
			break
		case 129004:
			str = '算法不支持'
			break
		case 129005:
			str = '口令认证失败'
			break
		case 129006:
			str = 'nonce认证失败'
			break
		case 129007:
			str = '您没有使用当前系统的权限！'
			break
		case 190001:
			str = '入参为空'
			break
		case 190002:
			str = '业务逻辑错误'
			break
		case 190003:
			str = 'XSS敏感字符'
			break
		case 190004:
			str = 'luban接口请求错误'
			break
		case 190005:
			str = 'pms接口请求错误'
			break
		case 190006:
			str = '客户端时间与服务器时间不匹配'
			break
		case 190007:
			str = '验证码不能为空'
			break
		case 190008:
			str = '验证码不正确'
			break
		case 190009:
			str = '账号不支持新版本登录，请联系管理员重置密码或通过忘记密码重置'
			break
		case 190010:
			str = 'radar接口请求错误'
			break
		case 190011:
			str = 'pms接口请求参数错误'
			break
		case 190012:
			str = 'pms接口redis操作失败'
			break
		case 190013:
			str = 'pms接口mysql请求失败'
			break
		case 190014:
			str = 'pms接口文件读取错误'
			break
		case 190015:
			str = 'pms接口license缺少字段'
			break
		case 190016:
			str = 'pms接口license文件机器码校验失败'
			break
		case 190017:
			str = 'pms接口没找到符合条件的license文件'
			break
		case 190018:
			str = 'pms接口服务发现接口请求失败'
			break
		case 190019:
			str = 'pms接口服务发现接口返回值缺少需要的参数'
			break
		case 190020:
			str = 'pms接口rabbtmq错误'
			break
		case 190021:
			str = 'pms接口其他类型授权已存在相同license文件'
			break
		case 190022:
			str = 'pms接口服务器错误'
			break
		case 190023:
			str = '邮件发送失败'
			break
		case 190024:
			str = 'pms接口获取证书序列号失败'
			break
		case 190025:
			str = 'nms接口请求错误'
			break
		case 190026:
			str = 'jdb接口请求错误'
			break
		case 190027:
			str = 'meeting接口请求错误'
			break
		case 190028:
			str = 'vrs接口请求错误'
			break
		case 190029:
			str = 'KDFS接口请求错误'
			break
		case 190030:
			str = 'KDFS上传文件失败'
			break
		case 190031:
			str = 'KDFS下载文件失败'
			break
		case 190032:
			str = 'KDFS删除文件夹失败'
			break
		case 190033:
			str = 'KDFS删除文件失败'
			break
		case 190034:
			str = 'KDFS复制文件失败'
			break
		case 190035:
			str = 'KDFS改名文件失败'
			break
		case 190036:
			str = 'KDFS查询目录状态失败'
			break
		case 190037:
			str = 'pms接口验证证书已过期'
			break
		case 190038:
			str = 'pms接口验证其他机房已存在相同license文件'
			break
		case 200001:
			str = '无访问权限'
			break
		default:
			var error_code = window.localStorage.getItem('error_code')
			if (error_code && JSON.parse(error_code).code[code]) {
				str = JSON.parse(error_code).code[code]
			} else {
				str = description || code + ':未知错误'
			}
			break
	}
	return str
}
